home *** CD-ROM | disk | FTP | other *** search
- const updateInterval = 2;
- var today_d,today_m,today_y : Word;
- k : string;
- i : integer;
- function NeedUpdate(filename : string) : boolean;
- var d,m,y : Word;
- begin
- DecodeDate(GetFileDateTime(filename),y,m,d);
- if (y = today_y) or (m = today_m) or
- (Abs(today_d - d) < UpdateInterval) then
- Result := true else Result := false;
- end;
- begin
- DecodeDate(Now,today_y,today_m,today_d);
- k := Extractfilepath(ParamList.Strings[0]);
- New(Format('%s%d_%d_%d.zip',[
- k,today_y,today_m,today_d]));
- for i := 0 to ParamList.count -1 do
- if NeedUpdate(ParamList.Strings[i]) then
- Add(ParamList.Strings[i]);
- DoAdd;
- end.
-